<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/mytag.jspf"%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>我的卡券</title>
<script type="text/javascript">
var $modal = $('#doc-modal');
$(".app-coupon").on("click", function() {
	$modal.find(".div-shopNames").text($(this).find(".div-shopNames").text());
	$modal.modal();
});
</script>
</head>
<body>
	<c:if test="${not empty resultMsg}">
		<script type="text/javascript">
		Comm.msg("${resultMsg.msg}");
	</script>
	</c:if>
	<c:forEach items="${list}" var="c" varStatus="status">
		<c:choose>
			<c:when test="${status.index%2==0}">
				<div class="app-coupon">
					<img src="assets/img/coupon1.png">
					<div class="coupon-title">${c.serviceItemName}</div>
					<div class="coupon-date">${c.stateName}&nbsp;&nbsp;有效期至<fmt:formatDate value='${c.endDate}' type="date" pattern="yyyy年MM月dd日"/></div>
					<div class="div-shopNames" style="display:none">${c.shopNames}</div>
				</div>
			</c:when>
			<c:otherwise>
				<div class="app-coupon">
					<img src="assets/img/coupon2.png">
					<div class="coupon-title">${c.serviceItemName}</div>
					<div class="coupon-date">${c.stateName}&nbsp;&nbsp;有效期至<fmt:formatDate value='${c.endDate}' type="date" pattern="yyyy年MM月dd日"/></div>
					<div class="div-shopNames" style="display:none">${c.shopNames}</div>
				</div>
			</c:otherwise>
		</c:choose>
	</c:forEach>
	<div class="am-modal am-modal-landiao am-modal-no-btn" tabindex="-1" id="doc-modal">
		<div class="am-modal-dialog">
			<form id="evaluateForm">
			<input type="hidden" name="orderInfoId" id="orderInfoId">
			<div class="am-modal-hd">适用门店 </div>
			<div class="am-modal-bd am-text-left am-padding-horizontal-0">
				<div class="am-g">
					<div class="am-u-sm-12 div-shopNames"></div>
				</div>
			</div>
			</form>
		</div>
	</div>
</body>
</html>
